package Ejercicios;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author djdracku
 */
public class FormulaGeneral {

public static void main(String args[]){
    int a=1;
    int b=2;
    int c=1;

    double x1=((-b+(Math.sqrt(Math.pow(b, 2)-(4*a*c))))/(2*a));
    System.out.println("Resultado x1:"+x1);

    double x2=((-b-(Math.sqrt(Math.pow(b, 2)-(4*a*c))))/(2*a));
    System.out.println("Resultado x1:"+x2);

}

}
